fix(client): fail fast on 202 after SSE reconnect exhaustion#2099
fix(client): fail fast on 202 after SSE reconnect exhaustion#2099he-yufeng wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 7af5901 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
|
The only remaining red check appears to be a Cloudflare Workers / Miniflare flake on Node 22: test/server/cloudflareWorkers.test.ts failed with SdkError: Error POSTing to endpoint: Error: Network connection lost, while the rest of that integration shard reported 422 passed tests. I tried to rerun the failed job, but GitHub rejected it because I do not have repository admin rights. Could a maintainer rerun est (22) when convenient? |
This comment was marked as abuse.
This comment was marked as abuse.
|
Rebased onto current main and force-pushed 91c515f. Local validation: changeset status shows @modelcontextprotocol/client patch; client streamableHttp.test.ts passed with 54 tests; client typecheck and lint passed; git diff --check passed. Note: my first Vitest command used a repo-root-relative path under the filtered package and found no files; reran with the package-relative path. |
3597345 to
91c515f
Compare
Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>
|
Rebased on the new e2e suite and adjusted the failure boundary in 7af5901. The previous version failed every future request once the standalone GET SSE reconnect budget was exhausted. The new consumer e2e test expects direct-response requests to keep working after that failure, so the PR now only fails fast when a later request gets Local validation:
The push also passed the repo pre-push hook: repo-wide build, typecheck, and lint. |
Summary
202 Accepted, because that response path depends on the dead standalone SSE channelstatusTextis emptyFixes #2098.
To verify
pnpm --filter @modelcontextprotocol/client test -- streamableHttp.test.tspnpm --filter @modelcontextprotocol/test-e2e exec vitest run scenarios/transport-http.test.tspnpm --filter @modelcontextprotocol/client typecheckpnpm --filter @modelcontextprotocol/client lintpnpm --filter @modelcontextprotocol/client buildpnpm changeset status --since upstream/maingit diff --checkThe latest push also passed the repo pre-push hook: repo-wide build, typecheck, and lint.